﻿@model AFT.Parking.Entity.ScanCodeAndLocation
@{
    ViewBag.Title = "添加路线信息";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
@section Head
{
    <script src="/resources/scripts/ajaxfileupload.js"></script>
}
<div class="content-box">
    <div class="content-box-header">
        <h3>添加路线信息</h3>
        <div class="clear"></div>
    </div>
    <div class="content-box-content">
        <div class="tab-content default-tab" id="tab2">
            <form method="post" id="frm">
                <fieldset>
                    @Html.HiddenFor(m => m.LocationId)
                    @Html.HiddenFor(m => m.LineImg)
                    <p>
                        <label>路线描述</label>
                        @Html.TextAreaFor(m => m.ShowTxt, new { @class = "text-input small-input" })
                    </p>
                    <p>
                        @*<label>路线图</label>
                        <a href="javascript:void(0)" id="aFile">上传图片</a>
                        <br />
                        <img id="ImgShow" src="@Model.LineImg" width="200px" height="150px" alt="" />*@
                        @*<script type="text/javascript">
                            new AjaxUpload($("#aFile"), {
                                action: '@Url.Action("FileUpLoadFile")',
                                name: 'UploadImg',
                                responseType: "json",
                                onSubmit: function (file, extension) {
                                    //$(".file-list > ul").html("<li style='text-align:center; padding-right:5px; background:none;border:none;color:#f00;font-size:12px;'><img src='/res/images/big_load.gif' width='16'>上传中...</li>");
                                },
                                onComplete: function (file, data) {
                                    if (data.Value) {
                                        $("#ImgShow").attr("src", data.Result[0]);
                                        $("#LineImg").val(data.Result[0]);
                                    } else {
                                        alert("上传失败。");
                                    }
                                }
                            });
                        </script>*@
                    </p>
                    <p>
                        <input class="button" type="submit" id="btnSubmit" value=" 保 存 " />
                        <input class="button" type="button" id="btnBack" value=" 返 回 " />
                        <input type="hidden" id="hd_backUrl" value="@Url.Action("mallLocations","MallLocation")">
                    </p>
                </fieldset>
                <div class="clear"></div>
            </form>
        </div>
    </div>
</div>

@if (ViewBag.Message != null)
{
    <script type="text/javascript">
        alert("@ViewBag.Message");
    </script>
}